#ifndef ANALYSIS_H_INCLUDED
#define ANALYSIS_H_INCLUDED

#include "defines.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <boost/lexical_cast.hpp>

using namespace std;

typedef struct d_raw
{
    string dtime;
    float dopen;
    float dhigh;
    float dlow;
    float dclose;
    float dvol;
    float dres;
} D_RAW;

class analysis
{
public:
    int num_data;
    analysis(){};
    ~analysis();
    void setup_data();
    int load_data();
    void build_ma();
    void build_so();
    void build_rsi();
    void build_m();
    void build_ema();
    void build_tea();
    void build_fama();
    void build_sd();

private:
    FILE * file_ptr;
    D_RAW * data_raw;
    float * data_ma;
    float * data_so_simple;
    float * data_so_smooth;
    float * data_rsi;
    float * data_ema;
    float * get_dopen();
    float * get_dhigh();
    float * get_dlow();
    float * get_dclose();
};

#endif // ANALYSIS_H_INCLUDED
